.class public Les/wd0;
.super Ljava/lang/Object;
.source "Share.java"


# instance fields
.field protected final a:Les/xd0;

.field private b:Ljava/util/concurrent/atomic/AtomicBoolean;


# direct methods
.method public constructor <init>(Lcom/hierynomus/smbj/common/c;Les/xd0;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance p1, Ljava/util/concurrent/atomic/AtomicBoolean;

    const/4 v0, 0x0

    invoke-direct {p1, v0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V

    iput-object p1, p0, Les/wd0;->b:Ljava/util/concurrent/atomic/AtomicBoolean;

    .line 3
    iput-object p2, p0, Les/wd0;->a:Les/xd0;

    .line 4
    invoke-virtual {p2, p0}, Les/xd0;->b(Les/wd0;)V

    return-void
.end method

.method protected static a(Les/xd0;Ljava/lang/String;JLjava/util/EnumSet;Ljava/util/EnumSet;Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;Ljava/util/EnumSet;)Lcom/hierynomus/smbj/smb2/messages/b;
    .locals 15
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Les/xd0;",
            "Ljava/lang/String;",
            "J",
            "Ljava/util/EnumSet<",
            "Lcom/hierynomus/smbj/smb2/SMB2ShareAccess;",
            ">;",
            "Ljava/util/EnumSet<",
            "Lcom/hierynomus/msfscc/FileAttributes;",
            ">;",
            "Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;",
            "Ljava/util/EnumSet<",
            "Lcom/hierynomus/smbj/smb2/SMB2CreateOptions;",
            ">;)",
            "Lcom/hierynomus/smbj/smb2/messages/b;"
        }
    .end annotation

    .line 11
    invoke-virtual {p0}, Les/xd0;->a()Les/qd0;

    move-result-object v0

    .line 12
    new-instance v14, Lcom/hierynomus/smbj/smb2/messages/b;

    .line 13
    invoke-virtual {v0}, Les/qd0;->a()Lcom/hierynomus/smbj/connection/a;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hierynomus/smbj/connection/a;->i()Lcom/hierynomus/smbj/smb2/SMB2Dialect;

    move-result-object v2

    .line 14
    invoke-virtual {v0}, Les/qd0;->b()J

    move-result-wide v3

    invoke-virtual {p0}, Les/xd0;->b()J

    move-result-wide v5

    move-object v1, v14

    move-wide/from16 v7, p2

    move-object/from16 v9, p5

    move-object/from16 v10, p4

    move-object/from16 v11, p6

    move-object/from16 v12, p7

    move-object/from16 v13, p1

    invoke-direct/range {v1 .. v13}, Lcom/hierynomus/smbj/smb2/messages/b;-><init>(Lcom/hierynomus/smbj/smb2/SMB2Dialect;JJJLjava/util/EnumSet;Ljava/util/EnumSet;Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;Ljava/util/EnumSet;Ljava/lang/String;)V

    return-object v14
.end method


# virtual methods
.method public a(Ljava/lang/String;JLjava/util/EnumSet;Ljava/util/EnumSet;Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;Ljava/util/EnumSet;)Lcom/hierynomus/smbj/smb2/a;
    .locals 10
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "J",
            "Ljava/util/EnumSet<",
            "Lcom/hierynomus/msfscc/FileAttributes;",
            ">;",
            "Ljava/util/EnumSet<",
            "Lcom/hierynomus/smbj/smb2/SMB2ShareAccess;",
            ">;",
            "Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;",
            "Ljava/util/EnumSet<",
            "Lcom/hierynomus/smbj/smb2/SMB2CreateOptions;",
            ">;)",
            "Lcom/hierynomus/smbj/smb2/a;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/hierynomus/smbj/transport/TransportException;,
            Lcom/hierynomus/smbj/common/SMBApiException;
        }
    .end annotation

    move-object v0, p0

    .line 3
    iget-object v1, v0, Les/wd0;->a:Les/xd0;

    invoke-virtual {v1}, Les/xd0;->a()Les/qd0;

    move-result-object v1

    .line 4
    invoke-virtual {v1}, Les/qd0;->a()Lcom/hierynomus/smbj/connection/a;

    move-result-object v1

    .line 5
    iget-object v2, v0, Les/wd0;->a:Les/xd0;

    move-object v3, p1

    move-wide v4, p2

    move-object v6, p5

    move-object v7, p4

    move-object/from16 v8, p6

    move-object/from16 v9, p7

    invoke-static/range {v2 .. v9}, Les/wd0;->a(Les/xd0;Ljava/lang/String;JLjava/util/EnumSet;Ljava/util/EnumSet;Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;Ljava/util/EnumSet;)Lcom/hierynomus/smbj/smb2/messages/b;

    move-result-object v2

    .line 6
    invoke-virtual {v1, v2}, Lcom/hierynomus/smbj/connection/a;->b(Lcom/hierynomus/smbj/smb2/d;)Ljava/util/concurrent/Future;

    move-result-object v1

    .line 7
    sget-object v2, Lcom/hierynomus/smbj/transport/TransportException;->Wrapper:Les/fd0;

    invoke-static {v1, v2}, Les/gd0;->a(Ljava/util/concurrent/Future;Les/fd0;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/hierynomus/smbj/smb2/messages/c;

    .line 8
    invoke-virtual {v1}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v2

    invoke-virtual {v2}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v2

    sget-object v3, Lcom/hierynomus/mserref/NtStatus;->STATUS_SUCCESS:Lcom/hierynomus/mserref/NtStatus;

    if-ne v2, v3, :cond_0

    .line 9
    invoke-virtual {v1}, Lcom/hierynomus/smbj/smb2/messages/c;->c()Lcom/hierynomus/smbj/smb2/a;

    move-result-object v1

    return-object v1

    .line 10
    :cond_0
    new-instance v2, Lcom/hierynomus/smbj/common/SMBApiException;

    invoke-virtual {v1}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v1

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "Create failed for "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-object v4, p1

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v1, v3}, Lcom/hierynomus/smbj/common/SMBApiException;-><init>(Lcom/hierynomus/mserref/NtStatus;Ljava/lang/String;)V

    throw v2
.end method

.method public a()V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Les/wd0;->b:Ljava/util/concurrent/atomic/AtomicBoolean;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->getAndSet(Z)Z

    move-result v0

    if-nez v0, :cond_0

    .line 2
    iget-object v0, p0, Les/wd0;->a:Les/xd0;

    invoke-virtual {v0, p0}, Les/xd0;->a(Les/wd0;)V

    :cond_0
    return-void
.end method

.method public a(Lcom/hierynomus/smbj/smb2/a;)V
    .locals 9
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/hierynomus/smbj/transport/TransportException;,
            Lcom/hierynomus/smbj/common/SMBApiException;
        }
    .end annotation

    .line 15
    iget-object v0, p0, Les/wd0;->a:Les/xd0;

    invoke-virtual {v0}, Les/xd0;->a()Les/qd0;

    move-result-object v0

    invoke-virtual {v0}, Les/qd0;->a()Lcom/hierynomus/smbj/connection/a;

    move-result-object v0

    .line 16
    new-instance v8, Lcom/hierynomus/smbj/smb2/messages/a;

    .line 17
    invoke-virtual {v0}, Lcom/hierynomus/smbj/connection/a;->i()Lcom/hierynomus/smbj/smb2/SMB2Dialect;

    move-result-object v2

    iget-object v1, p0, Les/wd0;->a:Les/xd0;

    .line 18
    invoke-virtual {v1}, Les/xd0;->a()Les/qd0;

    move-result-object v1

    invoke-virtual {v1}, Les/qd0;->b()J

    move-result-wide v3

    iget-object v1, p0, Les/wd0;->a:Les/xd0;

    invoke-virtual {v1}, Les/xd0;->b()J

    move-result-wide v5

    move-object v1, v8

    move-object v7, p1

    invoke-direct/range {v1 .. v7}, Lcom/hierynomus/smbj/smb2/messages/a;-><init>(Lcom/hierynomus/smbj/smb2/SMB2Dialect;JJLcom/hierynomus/smbj/smb2/a;)V

    .line 19
    invoke-virtual {v0, v8}, Lcom/hierynomus/smbj/connection/a;->b(Lcom/hierynomus/smbj/smb2/d;)Ljava/util/concurrent/Future;

    move-result-object v0

    .line 20
    sget-object v1, Lcom/hierynomus/smbj/transport/TransportException;->Wrapper:Les/fd0;

    invoke-static {v0, v1}, Les/gd0;->a(Ljava/util/concurrent/Future;Les/fd0;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/hierynomus/smbj/smb2/messages/a;

    .line 21
    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v1

    sget-object v2, Lcom/hierynomus/mserref/NtStatus;->STATUS_SUCCESS:Lcom/hierynomus/mserref/NtStatus;

    if-ne v1, v2, :cond_0

    return-void

    .line 22
    :cond_0
    new-instance v1, Lcom/hierynomus/smbj/common/SMBApiException;

    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v0

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Close failed for "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v1, v0, p1}, Lcom/hierynomus/smbj/common/SMBApiException;-><init>(Lcom/hierynomus/mserref/NtStatus;Ljava/lang/String;)V

    throw v1
.end method

.method b()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/wd0;->b:Ljava/util/concurrent/atomic/AtomicBoolean;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V

    return-void
.end method

.method public c()Z
    .locals 1

    .line 1
    iget-object v0, p0, Les/wd0;->b:Ljava/util/concurrent/atomic/AtomicBoolean;

    invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z

    move-result v0

    xor-int/lit8 v0, v0, 0x1

    return v0
.end method
